#pragma once

#include <Windows.h>
#include <string>
#include <sstream>
#include <exception>

class CException : public std::exception
{
public:
	CException(int line, CONST CHAR* file);
	~CException();

	char const* what() const noexcept override;

private:
	int line;
	std::string file;

	mutable std::string whatBuffer;
};

#define HWND_EXCEPT() throw CException(__LINE__, __FILE__)